package com.igeekhome.microserviceconsumermovie8001.config;

import com.igeekhome.microservicecommon.feign.UserFeignServiceFallBack;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

/**
 * @author yadonghe
 * @date 2020-02-21 10:49
 */
@Configuration
public class MyWebConfig {

    @Bean
    @LoadBalanced
    public RestTemplate restTemplate() {
        return new RestTemplate();
    }

    @Bean
    public UserFeignServiceFallBack userFeignServiceFallBack(){
        return new UserFeignServiceFallBack();
    }


}
